Optimal. Leaf size=157 \[ \frac{a^2 f \text{Chi}\left (2 x f+\frac{2 c f}{d}\right ) \sinh \left (2 e-\frac{2 c f}{d}\right )}{d^2}+\frac{2 a^2 f \text{Chi}\left (x f+\frac{c f}{d}\right ) \sinh \left (e-\frac{c f}{d}\right )}{d^2}+\frac{2 a^2 f \cosh \left (e-\frac{c f}{d}\right ) \text{Shi}\left (x f+\frac{c f}{d}\right )}{d^2}+\frac{a^2 f \cosh \left (2 e-\frac{2 c f}{d}\right ) \text{Shi}\left (2 x f+\frac{2 c f}{d}\right )}{d^2}-\frac{4 a^2 \cosh ^4\left (\frac{e}{2}+\frac{f x}{2}\right )}{d (c+d x)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.332978, antiderivative size = 157, normalized size of antiderivative = 1., number of steps used = 9, number of rules used = 5, integrand size = 20, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.25, Rules used = {3318, 3313, 3303, 3298, 3301} \[ \frac{a^2 f \text{Chi}\left (2 x f+\frac{2 c f}{d}\right ) \sinh \left (2 e-\frac{2 c f}{d}\right )}{d^2}+\frac{2 a^2 f \text{Chi}\left (x f+\frac{c f}{d}\right ) \sinh \left (e-\frac{c f}{d}\right )}{d^2}+\frac{2 a^2 f \cosh \left (e-\frac{c f}{d}\right ) \text{Shi}\left (x f+\frac{c f}{d}\right )}{d^2}+\frac{a^2 f \cosh \left (2 e-\frac{2 c f}{d}\right ) \text{Shi}\left (2 x f+\frac{2 c f}{d}\right )}{d^2}-\frac{4 a^2 \cosh ^4\left (\frac{e}{2}+\frac{f x}{2}\right )}{d (c+d x)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3318
Rule 3313
Rule 3303
Rule 3298
Rule 3301
Rubi steps
\begin{align*} \int \frac{(a+a \cosh (e+f x))^2}{(c+d x)^2} \, dx &=\left (4 a^2\right ) \int \frac{\sin ^4\left (\frac{1}{2} (i e+\pi )+\frac{i f x}{2}\right )}{(c+d x)^2} \, dx\\ &=-\frac{4 a^2 \cosh ^4\left (\frac{e}{2}+\frac{f x}{2}\right )}{d (c+d x)}+\frac{\left (8 i a^2 f\right ) \int \left (-\frac{i \sinh (e+f x)}{4 (c+d x)}-\frac{i \sinh (2 e+2 f x)}{8 (c+d x)}\right ) \, dx}{d}\\ &=-\frac{4 a^2 \cosh ^4\left (\frac{e}{2}+\frac{f x}{2}\right )}{d (c+d x)}+\frac{\left (a^2 f\right ) \int \frac{\sinh (2 e+2 f x)}{c+d x} \, dx}{d}+\frac{\left (2 a^2 f\right ) \int \frac{\sinh (e+f x)}{c+d x} \, dx}{d}\\ &=-\frac{4 a^2 \cosh ^4\left (\frac{e}{2}+\frac{f x}{2}\right )}{d (c+d x)}+\frac{\left (a^2 f \cosh \left (2 e-\frac{2 c f}{d}\right )\right ) \int \frac{\sinh \left (\frac{2 c f}{d}+2 f x\right )}{c+d x} \, dx}{d}+\frac{\left (2 a^2 f \cosh \left (e-\frac{c f}{d}\right )\right ) \int \frac{\sinh \left (\frac{c f}{d}+f x\right )}{c+d x} \, dx}{d}+\frac{\left (a^2 f \sinh \left (2 e-\frac{2 c f}{d}\right )\right ) \int \frac{\cosh \left (\frac{2 c f}{d}+2 f x\right )}{c+d x} \, dx}{d}+\frac{\left (2 a^2 f \sinh \left (e-\frac{c f}{d}\right )\right ) \int \frac{\cosh \left (\frac{c f}{d}+f x\right )}{c+d x} \, dx}{d}\\ &=-\frac{4 a^2 \cosh ^4\left (\frac{e}{2}+\frac{f x}{2}\right )}{d (c+d x)}+\frac{a^2 f \text{Chi}\left (\frac{2 c f}{d}+2 f x\right ) \sinh \left (2 e-\frac{2 c f}{d}\right )}{d^2}+\frac{2 a^2 f \text{Chi}\left (\frac{c f}{d}+f x\right ) \sinh \left (e-\frac{c f}{d}\right )}{d^2}+\frac{2 a^2 f \cosh \left (e-\frac{c f}{d}\right ) \text{Shi}\left (\frac{c f}{d}+f x\right )}{d^2}+\frac{a^2 f \cosh \left (2 e-\frac{2 c f}{d}\right ) \text{Shi}\left (\frac{2 c f}{d}+2 f x\right )}{d^2}\\ \end{align*}
Mathematica [A] time = 0.630069, size = 207, normalized size = 1.32 \[ \frac{a^2 \left (2 f (c+d x) \text{Chi}\left (\frac{2 f (c+d x)}{d}\right ) \sinh \left (2 e-\frac{2 c f}{d}\right )+4 f (c+d x) \text{Chi}\left (f \left (\frac{c}{d}+x\right )\right ) \sinh \left (e-\frac{c f}{d}\right )+4 d f x \cosh \left (e-\frac{c f}{d}\right ) \text{Shi}\left (f \left (\frac{c}{d}+x\right )\right )+2 d f x \cosh \left (2 e-\frac{2 c f}{d}\right ) \text{Shi}\left (\frac{2 f (c+d x)}{d}\right )+4 c f \cosh \left (e-\frac{c f}{d}\right ) \text{Shi}\left (f \left (\frac{c}{d}+x\right )\right )+2 c f \cosh \left (2 e-\frac{2 c f}{d}\right ) \text{Shi}\left (\frac{2 f (c+d x)}{d}\right )-4 d \cosh (e+f x)-d \cosh (2 (e+f x))-3 d\right )}{2 d^2 (c+d x)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.123, size = 308, normalized size = 2. \begin{align*} -{\frac{f{a}^{2}{{\rm e}^{-fx-e}}}{d \left ( dfx+cf \right ) }}+{\frac{f{a}^{2}}{{d}^{2}}{{\rm e}^{{\frac{cf-de}{d}}}}{\it Ei} \left ( 1,fx+e+{\frac{cf-de}{d}} \right ) }-{\frac{f{a}^{2}{{\rm e}^{fx+e}}}{{d}^{2}} \left ({\frac{cf}{d}}+fx \right ) ^{-1}}-{\frac{f{a}^{2}}{{d}^{2}}{{\rm e}^{-{\frac{cf-de}{d}}}}{\it Ei} \left ( 1,-fx-e-{\frac{cf-de}{d}} \right ) }-{\frac{3\,{a}^{2}}{2\,d \left ( dx+c \right ) }}-{\frac{f{a}^{2}{{\rm e}^{-2\,fx-2\,e}}}{4\,d \left ( dfx+cf \right ) }}+{\frac{f{a}^{2}}{2\,{d}^{2}}{{\rm e}^{2\,{\frac{cf-de}{d}}}}{\it Ei} \left ( 1,2\,fx+2\,e+2\,{\frac{cf-de}{d}} \right ) }-{\frac{f{a}^{2}{{\rm e}^{2\,fx+2\,e}}}{4\,{d}^{2}} \left ({\frac{cf}{d}}+fx \right ) ^{-1}}-{\frac{f{a}^{2}}{2\,{d}^{2}}{{\rm e}^{-2\,{\frac{cf-de}{d}}}}{\it Ei} \left ( 1,-2\,fx-2\,e-2\,{\frac{cf-de}{d}} \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.32004, size = 246, normalized size = 1.57 \begin{align*} -\frac{1}{4} \, a^{2}{\left (\frac{e^{\left (-2 \, e + \frac{2 \, c f}{d}\right )} E_{2}\left (\frac{2 \,{\left (d x + c\right )} f}{d}\right )}{{\left (d x + c\right )} d} + \frac{e^{\left (2 \, e - \frac{2 \, c f}{d}\right )} E_{2}\left (-\frac{2 \,{\left (d x + c\right )} f}{d}\right )}{{\left (d x + c\right )} d} + \frac{2}{d^{2} x + c d}\right )} - a^{2}{\left (\frac{e^{\left (-e + \frac{c f}{d}\right )} E_{2}\left (\frac{{\left (d x + c\right )} f}{d}\right )}{{\left (d x + c\right )} d} + \frac{e^{\left (e - \frac{c f}{d}\right )} E_{2}\left (-\frac{{\left (d x + c\right )} f}{d}\right )}{{\left (d x + c\right )} d}\right )} - \frac{a^{2}}{d^{2} x + c d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.16994, size = 767, normalized size = 4.89 \begin{align*} -\frac{a^{2} d \cosh \left (f x + e\right )^{2} + a^{2} d \sinh \left (f x + e\right )^{2} + 4 \, a^{2} d \cosh \left (f x + e\right ) + 3 \, a^{2} d - 2 \,{\left ({\left (a^{2} d f x + a^{2} c f\right )}{\rm Ei}\left (\frac{d f x + c f}{d}\right ) -{\left (a^{2} d f x + a^{2} c f\right )}{\rm Ei}\left (-\frac{d f x + c f}{d}\right )\right )} \cosh \left (-\frac{d e - c f}{d}\right ) -{\left ({\left (a^{2} d f x + a^{2} c f\right )}{\rm Ei}\left (\frac{2 \,{\left (d f x + c f\right )}}{d}\right ) -{\left (a^{2} d f x + a^{2} c f\right )}{\rm Ei}\left (-\frac{2 \,{\left (d f x + c f\right )}}{d}\right )\right )} \cosh \left (-\frac{2 \,{\left (d e - c f\right )}}{d}\right ) + 2 \,{\left ({\left (a^{2} d f x + a^{2} c f\right )}{\rm Ei}\left (\frac{d f x + c f}{d}\right ) +{\left (a^{2} d f x + a^{2} c f\right )}{\rm Ei}\left (-\frac{d f x + c f}{d}\right )\right )} \sinh \left (-\frac{d e - c f}{d}\right ) +{\left ({\left (a^{2} d f x + a^{2} c f\right )}{\rm Ei}\left (\frac{2 \,{\left (d f x + c f\right )}}{d}\right ) +{\left (a^{2} d f x + a^{2} c f\right )}{\rm Ei}\left (-\frac{2 \,{\left (d f x + c f\right )}}{d}\right )\right )} \sinh \left (-\frac{2 \,{\left (d e - c f\right )}}{d}\right )}{2 \,{\left (d^{3} x + c d^{2}\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} a^{2} \left (\int \frac{2 \cosh{\left (e + f x \right )}}{c^{2} + 2 c d x + d^{2} x^{2}}\, dx + \int \frac{\cosh ^{2}{\left (e + f x \right )}}{c^{2} + 2 c d x + d^{2} x^{2}}\, dx + \int \frac{1}{c^{2} + 2 c d x + d^{2} x^{2}}\, dx\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 2.31396, size = 485, normalized size = 3.09 \begin{align*} -\frac{2 \, a^{2} d f x{\rm Ei}\left (-\frac{2 \,{\left (d f x + c f\right )}}{d}\right ) e^{\left (\frac{2 \, c f}{d} - 2 \, e\right )} + 4 \, a^{2} d f x{\rm Ei}\left (-\frac{d f x + c f}{d}\right ) e^{\left (\frac{c f}{d} - e\right )} - 4 \, a^{2} d f x{\rm Ei}\left (\frac{d f x + c f}{d}\right ) e^{\left (-\frac{c f}{d} + e\right )} - 2 \, a^{2} d f x{\rm Ei}\left (\frac{2 \,{\left (d f x + c f\right )}}{d}\right ) e^{\left (-\frac{2 \, c f}{d} + 2 \, e\right )} + 2 \, a^{2} c f{\rm Ei}\left (-\frac{2 \,{\left (d f x + c f\right )}}{d}\right ) e^{\left (\frac{2 \, c f}{d} - 2 \, e\right )} + 4 \, a^{2} c f{\rm Ei}\left (-\frac{d f x + c f}{d}\right ) e^{\left (\frac{c f}{d} - e\right )} - 4 \, a^{2} c f{\rm Ei}\left (\frac{d f x + c f}{d}\right ) e^{\left (-\frac{c f}{d} + e\right )} - 2 \, a^{2} c f{\rm Ei}\left (\frac{2 \,{\left (d f x + c f\right )}}{d}\right ) e^{\left (-\frac{2 \, c f}{d} + 2 \, e\right )} + a^{2} d e^{\left (2 \, f x + 2 \, e\right )} + 4 \, a^{2} d e^{\left (f x + e\right )} + 4 \, a^{2} d e^{\left (-f x - e\right )} + a^{2} d e^{\left (-2 \, f x - 2 \, e\right )}}{4 \,{\left (d^{3} x + c d^{2}\right )}} - \frac{3 \, a^{2}}{2 \,{\left (d x + c\right )} d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]